<?php
use Core\Service\Parameterchooser\ParameterChooserFactory;
use Zend\Json\Json;

$error = $this->error;
$pageItem = $this->pageItem;
if($error){
//    echo '<h4>'.$error.'</h4>';
    exit;
}
$params = $pageItem->params;
if($params){
    $jsonObj = Json::decode($params);
    $parameter_Factory = new ParameterChooserFactory();
    echo '<div style="padding: 5px 20px; border-bottom: 1px dotted #ccc;border-top: 1px dotted #ccc">';
    foreach ($jsonObj as $key =>$val) {
        $paraGenerator = $parameter_Factory->getParameterchooserService($val);
        $genHtml = $paraGenerator->genHtml();
        echo '<div style="margin:5px"><span class="lbl_parameter_name" style="display: inline-block;width:100px">'.$key.'</span>: '.$genHtml.'</div>';
    }
}



?>

